﻿using Smobiler.Core;
using Smobiler.Core.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using FubiManger.UI;

namespace FubiManger.Controls
{
    ////ToolboxItem用于控制是否添加自定义控件到工具箱，true添加，false不添加
    //[System.ComponentModel.ToolboxItem(true)]
    partial class Updateclassifycontrol : Smobiler.Core.Controls.MobileUserControl
    {
        public Updateclassifycontrol() : base()
        {
            //This call is required by the SmobilerUserControl.
            InitializeComponent();
        }
        /// <summary>
        /// 分类ID
        /// </summary>
        public string classifyid { get; set; }
        /// <summary>
        /// 分类名称
        /// </summary>
        public string classtitle { set { txtitle.Text = value; } }
        private void btnclose_Press(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnsave_Press(object sender, EventArgs e)
        {
            if (classifyDal.Updatetitle(txtitle.Text, classifyid) > 0)
            {
                ((MainForm)this.Form).Refshclass();
                this.Close();
            }
        }
    }
}